#ifndef INSTRUCTIONS_C
#define INSTRUCTIONS_C

/* 
 * This header is used to decode and
 * execute instructions loaded into RAM
 */

/* If terminate is set to true the VM will
 * halt execution.
 */
bool terminate; 

#include "instructions/branch.c"
#include "instructions/test.c"
#include "instructions/fault.c"
#include "instructions/arithmetic.c"
#include "instructions/bitwise.c"
#include "instructions/ldelem.c"
#include "instructions/stelem.c"
#include "instructions/sysf.c"
#include "instructions/dup.c"
#include "instructions/push.c"
#include "instructions/pop.c"
#include "instructions/load.c"
#include "instructions/store.c"
#include "instructions/heap.c"
#include "instructions/conversions.c";

void decodeInstruction(char* opcode, char* argLength)
{
	*opcode = RAM[pos];
	pos++;
	*argLength = RAM[pos];
	pos++;
}

#endif
